<template>
  <div class="child">
    <h3>钱{{modelValue}}</h3>
    <button @click="handler">修改父组件数据</button>
  </div>
</template>

<script setup lang="ts">
let props=defineProps(["modelValue"])
let $emit=defineEmits(['update:modelValue'])

const handler= ()=>{
  console.log('emit update:modelValue');
  $emit('update:modelValue', props.modelValue +1000);
}
</script>

<style scoped>
.child {
  width: 600px;
  height: 300px;
  background: skyblue;
}
</style>